/**
 * 
 */
package com.workable.assignment.services.api;

import java.io.UnsupportedEncodingException;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.workable.assignment.client.MovieRamaClient;
import com.workable.assignment.domain.rottentomatoes.RTMovie;
import com.workable.assignment.domain.rottentomatoes.RTMovieReviews;
import com.workable.assignment.domain.themoviedb.TMDBMovie;
import com.workable.assignment.domain.themoviedb.TMDBMovieDetails;
import com.workable.assignment.domain.themoviedb.TMDBMovieReviews;

/**
 * @author npapadopoulos
 * @date Oct 21, 2014
 * 
 */
@Component
public class MovieRamaApiService implements IMovieRamaApiService {

	@Autowired
	private MovieRamaClient movieRamaClient;

	@Override
	public List<RTMovie> getRTMoviesInTheater() {
		return movieRamaClient.getRTMoviesInTheater();
	}

	@Override
	public List<TMDBMovie> getTMDBMoviesInTheater() {
		return movieRamaClient.getTMDBMoviesInTheater();
	}

	@Override
	public List<RTMovie> getSearchedRTMovies(String query) throws UnsupportedEncodingException {
		return movieRamaClient.getSearchedRTMovies(query);
	}

	@Override
	public TMDBMovieDetails getTMDBMovieDetails(long id) {
		return movieRamaClient.getTMDBMovieDetails(id);
	}

	@Override
	public List<TMDBMovie> getSearchedTMDBMovies(String query) throws UnsupportedEncodingException {
		return movieRamaClient.getSearchedTMDBMovies(query);
	}

	@Override
	public TMDBMovieReviews getTMDBMovieReviews(long id) {
		return movieRamaClient.getTMDBMovieReviews(id);
	}

	@Override
	public RTMovieReviews getRTMovieReviews(long id) {
		return movieRamaClient.getRTMovieReviews(id);
	}
}
